package com.qzdsoft.erpcloud.service.sys;

import java.util.List;
import java.util.Map;

import com.qzdsoft.erpcloud.domain.sys.SysMenuButton;
import com.qzdsoft.erpcloud.domain.sys.User;
import com.qzdsoft.erpcloud.vo.sys.MenuInfo;
import com.qzdsoft.erpcloud.vo.sys.SysMenubuttonQueryInfo;
import com.qzdsoft.erpcloud.vo.sys.SysMenubuttonQueryParam;
import com.qzdsoft.erpcloud.vo.sys.ZtreeNode;
import com.qzdsoft.vo.LayTableResponse;
import com.qzdsoft.vo.Page;
import com.qzdsoft.vo.Response;
import com.qzdsoft.vo.TypeInfo;

/**
 * Created by Administrator on 2017/6/20 0020.
 */
public interface SysMenuButtonService {
    Page<SysMenuButton> findPage(SysMenubuttonQueryParam params, User user);

    SysMenuButton selectById(Integer menuId);


    //获得所有目录菜单
    List<SysMenuButton> getAllTopMenu();

    List<SysMenuButton> selectAll(Integer status, Integer type);

    List<SysMenuButton> selectAllByRoleId(Integer status, Integer type, Integer roleId);

    //删除菜单
    Response delteMenu(Integer menuId);


    Response edit(SysMenuButton sysMenuButton);

    Response del(Integer id);

    /**
     * 查询登录用户具有的菜单
     * @param uid
     * @return
     */
    List<MenuInfo> selectAuthorizeMenu(Integer uid);

    /**
     * 查询具有权限的按钮
     * @return
     */
    List<TypeInfo> selectAuthorizedButton(Integer uid);
    
    /**
     * 查询所有具有权限的url
     * @param uid
     * @return
     */
    List<String> selectAuthorizedUrl(Integer uid);
    /**
     * 页面初始化数据查询
     * @param info
     * @return
     */
    LayTableResponse<SysMenuButton> findAllData(SysMenubuttonQueryInfo info);
    /**
     * 上级菜单 ztree数据查询
     */
    List<ZtreeNode> selectAllMenu(Integer type);
   /**
    * 
    * @param roleid 角色id
    * @param uid userId
    * 根据角色id和userId查询权限菜单设置数据
    * @return
    */
    List<ZtreeNode> findByRoleId(Integer roleid,Integer uid);
}
